<g:set var="tc_id" scope="page" >${(tgInstance?.tc?.id==null)?params['tc_id']:tgInstance?.tc?.id}</g:set>
<g:hiddenField name="tc.id" value="${tc_id.toLong()}" />
<table>
    <tbody>
        <tr class="prop">
            <td class="name">
                <label for="td"><g:message code="moc.tg.td.label" default="Td" /></label>
            </td>
            <td class="value ${hasErrors(bean: tgInstance, field: 'td', 'errors')}">
                <g:select name="td.id" from="${org.icress.fusion.moc.Td.list()}" optionKey="id" optionValue="td001" value="${tgInstance?.td?.id}"  />
            </td>
            <td class="name">
                <label for="tg001"><g:message code="moc.tg.tg001.label" default="Tg001" /></label>
            </td>
            <td class="value ${hasErrors(bean: tgInstance, field: 'tg001', 'errors')}">
                <g:textField name="tg001" value="${fieldValue(bean: tgInstance, field: 'tg001')}" />
            </td>
        </tr>
    </tbody>
</table>